STEP 1: Notice that we gave you two helper functions and a main() within which is a 2D list we called maze.

A two-dimensional list is a list of lists. That means that at every index in our larger list we store another list.

  • At maze[0], we've stored [0, 2, 2, 2, 0]. At each index inside maze, we've stored a list of five numbers.
  • Let's practice modifying our 2D list! Change the first value in the first list in maze from 0 to 3.
  • In maze, 0 is a wall, 1 is where our sprite will start, 2 is part of the maze's path, and 3 is the maze's end.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)